package com.fox.xn.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.fox.xn.model.AnswerItem;

public class AnswerItemMapper implements RowMapper<AnswerItem>{

	@Override
	public AnswerItem mapRow(ResultSet rs, int rn) throws SQLException {
		AnswerItem ai = new AnswerItem();
		ai.setAnswer(rs.getInt("answer"));
		ai.setAnswerId(rs.getInt("answer_id"));
		ai.setId(rs.getInt("id"));
		ai.setQuestion(rs.getInt("question"));
		return ai;
	}

}
